﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title></title>
        <link type="text/css" rel="stylesheet" media="all" href="../css/global.css" />
        <link type="text/css" rel="stylesheet" media="all" href="../css/global_color.css" /> 
    </head>
    <body onload="initialYearAndMonth();">
        <!--Logo区域开始-->
        <div id="header">
            <img src="../images/logo.png" alt="logo" class="left"/>
            <a href="#">[退出]</a>            
        </div>
        <!--Logo区域结束-->
        <!--导航区域开始-->
        <%@ include file="../head.jsp" %>
        <!--导航区域结束-->
        <!--主要区域开始-->
        <div id="main">
            <form action="${pageContext.request.contextPath }/bill/bill_service_detail.do" method="post">
                <!--查询-->
                <div class="search_add">                        
                    <div>账务账号：<span class="readonly width70">admin1</span></div>                            
                    <div>OS 账号：<span class="readonly width100">openlab1</span></div>
                    <div>服务器 IP：<span class="readonly width100">192.168.0.20</span></div>
                    <div>计费时间：<span class="readonly width70">2013年8月</span></div>
                    <div>费用：<span class="readonly width70">34.78</span></div>
                    <!-- <input type="button" value="返回" class="btn_add" onclick="location.href='bill_item.html';" /> -->
                     <a href="${pageContext.request.contextPath }/bill/bill_item.do" class="btn_add">返回</a>
                </div>  
                <!--数据区域：用表格展示数据-->     
                <div id="data">            
                    <table id="datalist">
                        <tr>
                            <th class="width150">客户登录 IP</th>
                            <th class="width150">登入时刻</th>
                            <th class="width150">登出时刻</th>
                            <th class="width100">时长（秒）</th>
                            <th class="width150">费用</th>
                            <th>资费</th>
                        </tr>
                    <!--     <tr>
                            <td>192.168.100.100</td>
                            <td>2013/01/01 12:12:12</td>
                            <td>2013/01/01 12:12:22</td>
                            <td>10</td>
                            <td>0</td>
                            <td>包 20 小时</td>
                        </tr> -->
                        <c:forEach items="${bills}" var="bill" varStatus="status">
	                    <tr>
	                        <td>${bill.bip}</td>
	                        <td>${bill.btime}</td>
	                        <td>${bill.bcname}</td>
	                        <td>${bill.bcid}</td>
	                        <td>${bill.btime}</td> 
	                        <td>${bill.bosname}</td>                        
	                    </tr>
                    </c:forEach>
                    </table>
                </div>
                <!--分页-->
                <div id="pages">
        	        共${totalRecord}条数据  每页${pageSize}条  页次 ${currentPage}/${pageCount}页
					<c:choose > 
						<c:when test="${currentPage == 1}">    <!--如果 --> 
							<a href="${pageContext.request.contextPath }/bill/bill_service_detail.do?currentPage=${currentPage+1}">下一页</a>
							<a href="${pageContext.request.contextPath }/bill/bill_service_detail.do?currentPage=${pageCount}">尾页</a>	
						</c:when>      
						<c:when test="${currentPage == pageCount}">  <!--否则 -->    
							<a href="${pageContext.request.contextPath }/bill/bill_service_detail.do?currentPage=1">首页</a>
							<a href="${pageContext.request.contextPath }/bill/bill_service_detail.do?currentPage=${currentPage-1}">上一页</a>
						</c:when> 
						<c:otherwise >  <!--否则 -->     
							<a href="${pageContext.request.contextPath }/bill/bill_service_detail.do?currentPage=1">首页</a>
							<a href="${pageContext.request.contextPath }/bill/bill_service_detail.do?currentPage=${currentPage-1}">上一页</a>
							<a href="${pageContext.request.contextPath }/bill/bill_service_detail.do?currentPage=${currentPage+1}">下一页</a>
							<a href="${pageContext.request.contextPath }/bill/bill_service_detail.do?currentPage=${pageCount}">尾页</a>
						</c:otherwise> 
					</c:choose>
                </div>                                  
            </form>
        </div>
        <!--主要区域结束-->
        <div id="footer">
           
        </div>
    </body>
</html>
